package com.demo.service.impl;

import com.demo.dao.ManagerDao;
import com.demo.dao.RoleDao;
import com.demo.pojo.Manager;
import com.demo.pojo.Role;
import com.demo.service.ManagerService;
import com.demo.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleDao roleDao;

    public void setRoleDao(RoleDao roleDao) {
        this.roleDao = roleDao;
    }

    @Override
    public Role findOne(int id) {
        return roleDao.findOne(id);
    }

    @Override
    public List<Role> findOnePage() {
        return roleDao.findOnePage();
    }

    @Override
    public int deleteOne(int id) {
        return roleDao.deleteOne(id);
    }

    @Override
    public int addOne(Map<String, Object> map) {
        return roleDao.addOne(map);
    }

    @Override
    public int changeName(Map<String, Object> map) {
        return roleDao.changeName(map);
    }


}
